Registering the DataDirect Spy™ JDBC Driver
To use the Spy JDBC Driver, you first must register it with the JDBC Driver Manager. You can register the Spy JDBC Driver in any of the following ways:
- Method 1: Set the Java property jdbc.drivers using the Java -D option. The jdbc.drivers property is defined as a colon-separated list of driver class names. For example:
com.ddtek.jdbcspy.SpyDriver:
com.ddtek.jdbc.sequelink.SequeLinkDriverThe jdbc.drivers property can be set like other Java properties, using the -D option. For example:
java -Djdbc.drivers=com.ddtek.jdbcspy.SpyDriver
- Method 2: Set the Java property jdbc.drivers from within your Java application or applet. To do this, code the following lines in your Java application or applet, and call DriverManager.getConnection():
Properties p = System.getProperties();
p.put ("jdbc.drivers", "com.ddtek.jdbcspy.SpyDriver");
System.setProperties (p);
- Method 3: Explicitly load the driver class using the standard Class.forName() method. To do this, code the following line and call DriverManager.getConnection():
Class.forName("com.ddtek.jdbcspy.SpyDriver");
DataDirect Spy™ Attributes
DataDirect Spy uses the following format as a connection URL:
where
original-urlis the connection URL of the underlying JDBC driver.In addition, you can specify the following options: